/**
 * 
 */
package tests;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import reit.main.Asset;
import reit.main.AssetContent;

/**
 * @author Mordechai
 *
 */
public class AssetContentTest {
	private AssetContent toTest;
	
	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
		toTest = new AssetContent("Working", 60);
		
	}

	/**
	 * @throws java.lang.Exception
	 */

	@Test
	public void testGetRepairCostMultiplier() {
		assertEquals(60, toTest.getRepairCostMultiplier(),0);
	}

	/**
	 * Test method for {@link reit.main.AssetContent#getName()}.
	 */
	@Test
	public void testGetName() {
		assertEquals("Working", toTest.getName());
	}

	/**
	 * Test method for {@link reit.main.AssetContent#getHealth()}.
	 */
	@Test
	public void testGetHealth() {
		assertEquals(100, toTest.getHealth(),0);
	}
	
	/**
	 * Test method for {@link reit.main.AssetContent#causeDamage(float)}.
	 */
	@Test
	public void testCauseDamage() {
		toTest.causeDamage(25);
		assertEquals(75, toTest.getHealth(),0);
	}

	/**
	 * Test method for {@link reit.main.AssetContent#fix()}.
	 */
	@Test
	public void testFix() {
		toTest.causeDamage(25);
		toTest.fix();
		assertEquals(100, toTest.getHealth(),0);
	}
	
	

}
